import request from '@/utils/request'

export function getGoodsList (params) {
  return request(
    {
      url: '/goods',
      method: 'GET',
      params
    }
  )
}

export function removeById (data) {
  return request(
    {
      url: `goods/${data}`,
      method: 'DELETE'
    }
  )
}

export function getCateList () {
  return request(
    {
      url: '/categories',
      method: 'GET'
    }
  )
}

export function tabClicked (id, params) {
  return request(
    {
      url: `categories/${id}/attributes`,
      method: 'GET',
      params
    }
  )
}

export function add (data) {
  return request(
    {
      url: '/goods',
      method: 'POST',
      data
    }
  )
}

export function getOrderList (params) {
  return request(
    {
      url: '/orders',
      method: 'GET',
      params
    }
  )
}

export function showProgressBox () {
  return request(
    {
      url: '/kuaidi/1106975712662',
      method: 'GET'
    }
  )
}

export function mounted () {
  return request({
    url: 'reports/type/1',
    method: 'GET'
  })
}
